import java.util.Scanner;

public class Main1004 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a=1;
        if (n <= 10 && n >= 1) {
            for (int i = 1; i <= n; i++){
                a=a*i;
            }System.out.println(a);
        }
    }
}